/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import "console"

rule CVE_2024_54030
{
    meta:
        date = "2025-01-22"
        openharmony_sa = ""
        cve = "CVE-2024-54030"
        // 这是你提取出来的那个文件名
        affected_files = "/system/lib/libsoftbus_server.z.so"

    strings:
        // 特征：这是补丁中新增的字符串。
        // 如果文件里有这句话，说明打过补丁了。
        $fix = "lock list err"

    condition:
        // 逻辑：如果找到了 $fix 字符串，打印 pass (通过测试)
        $fix and console.log("CVE-2024-54030 testcase pass")
}